<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">11063</assigned-user-id>
  <attachments-count type="integer">2</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2009-05-19T12:47:58-04:00</created-at>
  <creator-id type="integer">11063</creator-id>
  <milestone-due-on type="datetime">2009-05-18T20:00:00-04:00</milestone-due-on>
  <milestone-id type="integer">40236</milestone-id>
  <number type="integer">3</number>
  <permalink>fwd-ri_cal-question</permalink>
  <priority type="integer">3</priority>
  <project-id type="integer">30941</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>resolved</state>
  <tag nil="true"></tag>
  <title>Component without recurrence properties should enumerate just itself.</title>
  <updated-at type="datetime">2009-05-25T09:26:57-04:00</updated-at>
  <user-id type="integer">11063</user-id>
  <user-name>Rick DeNatale</user-name>
  <creator-name>Rick DeNatale</creator-name>
  <assigned-user-name>Rick DeNatale</assigned-user-name>
  <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
  <milestone-title>0.0.8</milestone-title>
  <original-body>---------- Forwarded message ----------
From: Bruno Duy&#233; &lt;bduye@siliconsalad.com&gt;
Date: Tue, May 19, 2009 at 9:57 AM
Subject: RI_CAL question
To: rick.denatale@gmail.com


Hi Rick,

I found your adress in your GitHub profile.
I'm working on ics calendars on a Rails project. My goal is to get a
list of legal holidays. I have a ics calendar that containts that
list.
I first tried Icalendar (http://icalendar.rubyforge.org/) but, as you
probably know, it appears that it's just a ICS fileformat parser and
isn't able to generate a list of occurences.
So I turned myself to ri_cal.

I know how to parse a file to create a RiCal::Component::Calendar
object (RiCal.parse(my_file)) but I can't find how to get an Event
object to be able to call the RiCal::OccurrenceEnumerator#occurrences
function who - if I understand well - is able to generate a list of
dates for an event of a calendar.

I tried :
cal=RiCal.parse(my_cal_file)

then

irb(main):007:0&gt; cal.first.events.first.occurrences
NoMethodError: undefined method `bounded?' for
RiCal::OccurrenceEnumerator::EmptyRulesEnumerator:Class
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:113:in
`bounded?'
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:117:in
`to_a'
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:137:in
`occurrences'
&#160; &#160; &#160; &#160;from (irb):7
&#160; &#160; &#160; &#160;from :0

I suppose that it's not the regular way to do that.

Can you find the time to help me ?
I'm ok then to write a piece of doc explaining the best I can howto
accumplish that.


Thanks for ri_cal !
Bruno Duy&#233;

http://github.com/brunetton

--
Bruno Duy&#233;
Silicon Salad
9 place de St Andr&#233;
59000 Lile
http://www.siliconsalad.com/

Tel 03 69 61 60 70
Mob 06 89 55 38 41
Fax 03 69 61 60 71
Ligne directe 03 69 61 60 76




-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale</original-body>
  <latest-body>---------- Forwarded message ----------
From: Bruno Duy&#233; &lt;bduye@siliconsalad.com&gt;
Date: Tue, May 19, 2009 at 9:57 AM
Subject: RI_CAL question
To: rick.denatale@gmail.com


Hi Rick,

I found your adress in your GitHub profile.
I'm working on ics calendars on a Rails project. My goal is to get a
list of legal holidays. I have a ics calendar that containts that
list.
I first tried Icalendar (http://icalendar.rubyforge.org/) but, as you
probably know, it appears that it's just a ICS fileformat parser and
isn't able to generate a list of occurences.
So I turned myself to ri_cal.

I know how to parse a file to create a RiCal::Component::Calendar
object (RiCal.parse(my_file)) but I can't find how to get an Event
object to be able to call the RiCal::OccurrenceEnumerator#occurrences
function who - if I understand well - is able to generate a list of
dates for an event of a calendar.

I tried :
cal=RiCal.parse(my_cal_file)

then

irb(main):007:0&gt; cal.first.events.first.occurrences
NoMethodError: undefined method `bounded?' for
RiCal::OccurrenceEnumerator::EmptyRulesEnumerator:Class
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:113:in
`bounded?'
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:117:in
`to_a'
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:137:in
`occurrences'
&#160; &#160; &#160; &#160;from (irb):7
&#160; &#160; &#160; &#160;from :0

I suppose that it's not the regular way to do that.

Can you find the time to help me ?
I'm ok then to write a piece of doc explaining the best I can howto
accumplish that.


Thanks for ri_cal !
Bruno Duy&#233;

http://github.com/brunetton

--
Bruno Duy&#233;
Silicon Salad
9 place de St Andr&#233;
59000 Lile
http://www.siliconsalad.com/

Tel 03 69 61 60 70
Mob 06 89 55 38 41
Fax 03 69 61 60 71
Ligne directe 03 69 61 60 76




-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;---------- Forwarded message ---------- From: Bruno Duy&amp;eacute;
Date: Tue, May 19, 2009 at 9:57 AM Subject: RI_CAL question To:
&lt;a href=&quot;mailto:rick.denatale@gmail.com&quot;&gt;rick.denatale@gmail.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi Rick,&lt;/p&gt;
&lt;p&gt;I found your adress in your GitHub profile. I'm working on ics
calendars on a Rails project. My goal is to get a list of legal
holidays. I have a ics calendar that containts that list. I first
tried Icalendar (&lt;a href=&quot;http://icalendar.rubyforge.org/)&quot;&gt;http://icalendar.rubyforge.org/)&lt;/a&gt;
but, as you probably know, it appears that it's just a ICS
fileformat parser and isn't able to generate a list of occurences.
So I turned myself to ri_cal.&lt;/p&gt;
&lt;p&gt;I know how to parse a file to create a
RiCal::Component::Calendar object (RiCal.parse(my_file)) but I
can't find how to get an Event object to be able to call the
RiCal::OccurrenceEnumerator#occurrences function who - if I
understand well - is able to generate a list of dates for an event
of a calendar.&lt;/p&gt;
&lt;p&gt;I tried : cal=RiCal.parse(my_cal_file)&lt;/p&gt;
&lt;p&gt;then&lt;/p&gt;
&lt;p&gt;irb(main):007:0&amp;gt; cal.first.events.first.occurrences
NoMethodError: undefined method &lt;code&gt;bounded?' for
RiCal::OccurrenceEnumerator::EmptyRulesEnumerator:Class &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;from
/home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:113:in&lt;/code&gt;
bounded?' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from
/home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:117:in
&lt;code&gt;to_a' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from
/home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:137:in&lt;/code&gt;
occurrences' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from (irb):7 &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;from :0&lt;/p&gt;
&lt;p&gt;I suppose that it's not the regular way to do that.&lt;/p&gt;
&lt;p&gt;Can you find the time to help me ? I'm ok then to write a piece
of doc explaining the best I can howto accumplish that.&lt;/p&gt;
&lt;p&gt;Thanks for ri_cal ! Bruno Duy&amp;eacute;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/brunetton&quot;&gt;http://github.com/brunetton&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-- Bruno Duy&amp;eacute; Silicon Salad 9 place de St Andr&amp;eacute;
59000 Lile &lt;a href=&quot;http://www.siliconsalad.com/&quot;&gt;http://www.siliconsalad.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tel 03 69 61 60 70 Mob 06 89 55 38 41 Fax 03 69 61 60 71 Ligne
directe 03 69 61 60 76&lt;/p&gt;
&lt;p&gt;-- Rick DeNatale&lt;/p&gt;
&lt;p&gt;Blog: &lt;a href=&quot;http://talklikeaduck.denhaven2.com/&quot;&gt;http://talklikeaduck.denhaven2.com/&lt;/a&gt;
Twitter: &lt;a href=&quot;http://twitter.com/RickDeNatale&quot;&gt;http://twitter.com/RickDeNatale&lt;/a&gt;
WWR: &lt;a href=&quot;http://www.workingwithrails.com/person/9021-rick-denatale&quot;&gt;http://www.workingwithrails.com/...&lt;/a&gt;
LinkedIn: &lt;a href=&quot;http://www.linkedin.com/in/rickdenatale&quot;&gt;http://www.linkedin.com/in/rickd...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>---------- Forwarded message ----------
From: Bruno Duy&#233; 
Date: Tue, May 19, 2009 at 9:57 AM
Subject: RI_CAL question
To: rick.denatale@gmail.com


Hi Rick,

I found your adress in your GitHub profile.
I'm working on ics calendars on a Rails project. My goal is to get a
list of legal holidays. I have a ics calendar that containts that
list.
I first tried Icalendar (http://icalendar.rubyforge.org/) but, as you
probably know, it appears that it's just a ICS fileformat parser and
isn't able to generate a list of occurences.
So I turned myself to ri_cal.

I know how to parse a file to create a RiCal::Component::Calendar
object (RiCal.parse(my_file)) but I can't find how to get an Event
object to be able to call the RiCal::OccurrenceEnumerator#occurrences
function who - if I understand well - is able to generate a list of
dates for an event of a calendar.

I tried :
cal=RiCal.parse(my_cal_file)

then

irb(main):007:0&gt; cal.first.events.first.occurrences
NoMethodError: undefined method `bounded?' for
RiCal::OccurrenceEnumerator::EmptyRulesEnumerator:Class
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:113:in
`bounded?'
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:117:in
`to_a'
&#160; &#160; &#160; &#160;from /home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:137:in
`occurrences'
&#160; &#160; &#160; &#160;from (irb):7
&#160; &#160; &#160; &#160;from :0

I suppose that it's not the regular way to do that.

Can you find the time to help me ?
I'm ok then to write a piece of doc explaining the best I can howto
accumplish that.


Thanks for ri_cal !
Bruno Duy&#233;

http://github.com/brunetton

--
Bruno Duy&#233;
Silicon Salad
9 place de St Andr&#233;
59000 Lile
http://www.siliconsalad.com/

Tel 03 69 61 60 70
Mob 06 89 55 38 41
Fax 03 69 61 60 71
Ligne directe 03 69 61 60 76




-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale</body>
      <body-html>&lt;div&gt;&lt;p&gt;---------- Forwarded message ---------- From: Bruno
Duy&amp;eacute;&lt;br&gt;
Date: Tue, May 19, 2009 at 9:57 AM&lt;br&gt;
Subject: RI_CAL question&lt;br&gt;
To: &lt;a href=
&quot;mailto:rick.denatale@gmail.com&quot;&gt;rick.denatale@gmail.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi Rick,&lt;/p&gt;
&lt;p&gt;I found your adress in your GitHub profile.&lt;br&gt;
I'm working on ics calendars on a Rails project. My goal is to get
a&lt;br&gt;
list of legal holidays. I have a ics calendar that containts
that&lt;br&gt;
list.&lt;br&gt;
I first tried Icalendar (&lt;a href=
&quot;http://icalendar.rubyforge.org/&quot;&gt;http://icalendar.rubyforge.org/&lt;/a&gt;)
but, as you&lt;br&gt;
probably know, it appears that it's just a ICS fileformat parser
and&lt;br&gt;
isn't able to generate a list of occurences.&lt;br&gt;
So I turned myself to ri_cal.&lt;/p&gt;
&lt;p&gt;I know how to parse a file to create a
RiCal::Component::Calendar&lt;br&gt;
object (RiCal.parse(my_file)) but I can't find how to get an
Event&lt;br&gt;
object to be able to call the
RiCal::OccurrenceEnumerator#occurrences&lt;br&gt;
function who - if I understand well - is able to generate a list
of&lt;br&gt;
dates for an event of a calendar.&lt;/p&gt;
&lt;p&gt;I tried :&lt;br&gt;
cal=RiCal.parse(my_cal_file)&lt;/p&gt;
&lt;p&gt;then&lt;/p&gt;
&lt;p&gt;irb(main):007:0&amp;gt; cal.first.events.first.occurrences&lt;br&gt;
NoMethodError: undefined method &lt;code&gt;bounded?' for&amp;lt;br/&amp;gt;
RiCal::OccurrenceEnumerator::EmptyRulesEnumerator:Class&amp;lt;br/&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from
/home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:113:in&amp;lt;br/&amp;gt;&lt;/code&gt;bounded?'
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from
/home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:117:in&lt;br&gt;
&lt;code&gt;to_a' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from
/home/bruno/tmp/rubyredrick-ri_cal/lib/ri_cal/occurrence_enumerator.rb:137:in&amp;lt;br/&amp;gt;&lt;/code&gt;occurrences'
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from (irb):7&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from :0&lt;/p&gt;
&lt;p&gt;I suppose that it's not the regular way to do that.&lt;/p&gt;
&lt;p&gt;Can you find the time to help me ?&lt;br&gt;
I'm ok then to write a piece of doc explaining the best I can
howto&lt;br&gt;
accumplish that.&lt;/p&gt;
&lt;p&gt;Thanks for ri_cal !&lt;br&gt;
Bruno Duy&amp;eacute;&lt;/p&gt;
&lt;p&gt;&lt;a href=
&quot;http://github.com/brunetton&quot;&gt;http://github.com/brunetton&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-- Bruno Duy&amp;eacute;&lt;br&gt;
Silicon Salad&lt;br&gt;
9 place de St Andr&amp;eacute;&lt;br&gt;
59000 Lile&lt;br&gt;
&lt;a href=
&quot;http://www.siliconsalad.com/&quot;&gt;http://www.siliconsalad.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tel 03 69 61 60 70&lt;br&gt;
Mob 06 89 55 38 41&lt;br&gt;
Fax 03 69 61 60 71&lt;br&gt;
Ligne directe 03 69 61 60 76&lt;/p&gt;
&lt;p&gt;-- Rick DeNatale&lt;/p&gt;
&lt;p&gt;Blog: &lt;a href=
&quot;http://talklikeaduck.denhaven2.com/&quot;&gt;http://talklikeaduck.denhaven2.com/&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href=
&quot;http://twitter.com/RickDeNatale&quot;&gt;http://twitter.com/RickDeNatale&lt;/a&gt;&lt;br&gt;
WWR: &lt;a href=
&quot;http://www.workingwithrails.com/person/9021-rick-denatale&quot;&gt;http://www.workingwithrails.com/person/9021-rick-denatale&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href=
&quot;http://www.linkedin.com/in/rickdenatale&quot;&gt;http://www.linkedin.com/in/rickdenatale&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-19T12:47:59-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Fwd: RI_CAL question</title>
      <updated-at type="datetime">2009-05-20T08:14:36-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-19T12:53:45-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:title: &quot;Fwd: RI_CAL question&quot;
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>EmptyRulesEnumerator bounded? missing?</title>
      <updated-at type="datetime">2009-05-19T12:53:47-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-19T12:54:01-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>EmptyRulesEnumerator bounded? missing?</title>
      <updated-at type="datetime">2009-05-19T12:54:02-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>This bug might be a little misleading.  The calendar file of French holidays actually has no recurring events. Instead there are multiple individual events for

  Easter Monday 2007
  Ascension day 2008
  New Years day 2007
  F&#234;te du Travail (May Day) 2007
  Armistice Day (WWII) 2007
  Ascension day 2007
  Easter Monday 2007 repeated in the file
  Bastille Day 2007
  Feast of the Assumption 2007
etc.

The bug was that the occurrence enumerator was not propertly handing enumerating an event without recurrence rules, or recurrence lists  I have changed it so that an component without properties generating recurrences will produce ONE occurrents, i.e. the component itself.</body>
      <body-html>&lt;div&gt;&lt;p&gt;This bug might be a little misleading. The calendar file of
French holidays actually has no recurring events. Instead there are
multiple individual events for&lt;/p&gt;
&lt;p&gt;Easter Monday 2007 Ascension day 2008 New Years day 2007
F&amp;ecirc;te du Travail (May Day) 2007 Armistice Day (WWII) 2007
Ascension day 2007 Easter Monday 2007 repeated in the file Bastille
Day 2007 Feast of the Assumption 2007 etc.&lt;/p&gt;
&lt;p&gt;The bug was that the occurrence enumerator was not propertly
handing enumerating an event without recurrence rules, or
recurrence lists I have changed it so that an component without
properties generating recurrences will produce ONE occurrents, i.e.
the component itself.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-19T14:35:36-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>EmptyRulesEnumerator bounded? missing?</title>
      <updated-at type="datetime">2009-05-19T14:35:37-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-19T14:36:16-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:title: EmptyRulesEnumerator bounded? missing?
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Component without recurrence properties should enumerate just itself.</title>
      <updated-at type="datetime">2009-05-19T14:36:18-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-19T16:29:17-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
:milestone: 
</diffable-attributes>
      <milestone-id type="integer">40236</milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Component without recurrence properties should enumerate just itself.</title>
      <updated-at type="datetime">2009-05-19T16:29:22-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title>0.0.8</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Thanks Rick, the bug is resolved in 0.0.8.


But I still have a problem.
In french calendar, there are some events that repeats, and some that doesn't. For example, the event &quot;Jour de l'an&quot; is daily repeated :

BEGIN:VEVENT
CREATED:20070605T163903Z
LAST-MODIFIED:20070606T161656Z
DTSTAMP:20070607T120859Z
UID:c6a930d6-4ed5-45d8-bb3d-d3587a32b8aa
SUMMARY:Jour de l'an
CLASS:PUBLIC
RRULE:FREQ=YEARLY;INTERVAL=1
DTSTART;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20070101
DTEND;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20070102
CATEGORIES:Jours f&#233;ri&#233;s
END:VEVENT

but &quot;Lundi de P&#226;ques&quot; for 2011 isn't :

BEGIN:VEVENT
CREATED:20070607T112742Z
LAST-MODIFIED:20070607T115439Z
DTSTAMP:20070607T120859Z
UID:570d9fe7-cdc9-4fdf-9794-909edf520383
SUMMARY:Lundi de P&#226;ques
DTSTART;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20110425
DTEND;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20110426
CATEGORIES:Jours f&#233;ri&#233;s
END:VEVENT

I still don't understand how to get all occurrences for one of that events. 

To be more precise, I've created a little ics file who only contains 2 events : 
- &quot;event1&quot; on the 2009 June 1, never repeated
- &quot;event2&quot; on the 2009 June 3, monthly repeated

That file is attached 

I suppose that there's a way to obtain an array of cal's events occurrences's dates, but I can't find how. 
I mean I'm looking for a way to do :

@@@
&gt; cal = RiCal.parse('test.ics')
&gt; occurences1 = cal.first.events.first.occurences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(01/01/2010))
@@@

and get an array that can be parsed with collect{} to obtain an array of Dates :

@@@
&gt; occurences1.collect{|o| o[:begin_date]}
=&gt; [#&lt;Date: 01/06/2009&gt;]
@@@

@@@
&gt; occurences2 = cal.first.events[1].occurences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(01/01/2010))
&gt; occurences2.collect{|o| o[:begin_date]}
=&gt; [#&lt;Date: 03/06/2009&gt;, #&lt;Date: 03/07/2009&gt;, #&lt;Date: 03/08/2009&gt;, #&lt;Date: 03/09/2009&gt;, #&lt;Date: 03/10/2009&gt;, #&lt;Date: 03/11/2009&gt;, #&lt;Date: 03/12/2009&gt;]
@@@

Maybe I am wrong and there's no way to do that ?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks Rick, the bug is resolved in 0.0.8.&lt;/p&gt;
&lt;p&gt;But I still have a problem.&lt;br&gt;
In french calendar, there are some events that repeats, and some
that doesn't. For example, the event &quot;Jour de l'an&quot; is daily
repeated :&lt;/p&gt;
&lt;p&gt;BEGIN:VEVENT&lt;br&gt;
CREATED:20070605T163903Z&lt;br&gt;
LAST-MODIFIED:20070606T161656Z&lt;br&gt;
DTSTAMP:20070607T120859Z&lt;br&gt;
UID:c6a930d6-4ed5-45d8-bb3d-d3587a32b8aa&lt;br&gt;
SUMMARY:Jour de l'an&lt;br&gt;
CLASS:PUBLIC&lt;br&gt;
RRULE:FREQ=YEARLY;INTERVAL=1&lt;br&gt;
DTSTART;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20070101&lt;br&gt;
DTEND;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20070102&lt;br&gt;
CATEGORIES:Jours f&amp;eacute;ri&amp;eacute;s&lt;br&gt;
END:VEVENT&lt;/p&gt;
&lt;p&gt;but &quot;Lundi de P&amp;acirc;ques&quot; for 2011 isn't :&lt;/p&gt;
&lt;p&gt;BEGIN:VEVENT&lt;br&gt;
CREATED:20070607T112742Z&lt;br&gt;
LAST-MODIFIED:20070607T115439Z&lt;br&gt;
DTSTAMP:20070607T120859Z&lt;br&gt;
UID:570d9fe7-cdc9-4fdf-9794-909edf520383&lt;br&gt;
SUMMARY:Lundi de P&amp;acirc;ques&lt;br&gt;
DTSTART;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20110425&lt;br&gt;
DTEND;VALUE=DATE;TZID=/mozilla.org/20070129_1/Europe/Paris:20110426&lt;br&gt;
CATEGORIES:Jours f&amp;eacute;ri&amp;eacute;s&lt;br&gt;
END:VEVENT&lt;/p&gt;
&lt;p&gt;I still don't understand how to get all occurrences for one of
that events.&lt;/p&gt;
&lt;p&gt;To be more precise, I've created a little ics file who only
contains 2 events :&lt;br&gt;
- &quot;event1&quot; on the 2009 June 1, never repeated - &quot;event2&quot; on the
2009 June 3, monthly repeated&lt;/p&gt;
&lt;p&gt;That file is attached&lt;/p&gt;
&lt;p&gt;I suppose that there's a way to obtain an array of cal's events
occurrences's dates, but I can't find how.&lt;br&gt;
I mean I'm looking for a way to do :&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;&amp;gt; cal = RiCal.parse('test.ics')
&amp;gt; occurences1 = cal.first.events.first.occurences(:after =&amp;gt; Date.parse('01/01/1990'), :before =&amp;gt; Date.parse(01/01/2010))&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and get an array that can be parsed with collect{} to obtain an
array of Dates :&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;&amp;gt; occurences1.collect{|o| o[:begin_date]}
=&amp;gt; [#&amp;lt;Date: 01/06/2009&amp;gt;]&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;code&gt;&amp;gt; occurences2 = cal.first.events[1].occurences(:after =&amp;gt; Date.parse('01/01/1990'), :before =&amp;gt; Date.parse(01/01/2010))
&amp;gt; occurences2.collect{|o| o[:begin_date]}
=&amp;gt; [#&amp;lt;Date: 03/06/2009&amp;gt;, #&amp;lt;Date: 03/07/2009&amp;gt;, #&amp;lt;Date: 03/08/2009&amp;gt;, #&amp;lt;Date: 03/09/2009&amp;gt;, #&amp;lt;Date: 03/10/2009&amp;gt;, #&amp;lt;Date: 03/11/2009&amp;gt;, #&amp;lt;Date: 03/12/2009&amp;gt;]&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Maybe I am wrong and there's no way to do that ?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-20T06:06:08-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">40236</milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Component without recurrence properties should enumerate just itself.</title>
      <updated-at type="datetime">2009-05-20T06:06:09-04:00</updated-at>
      <user-id type="integer">47324</user-id>
      <user-name>brunetton (at gmail)</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title>0.0.8</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>Bruno,

I tried to verify your problem, but I'm not sure I understand.

It seems to work except that the second event occurences are getting DateTimes for their dtstart values instead of Dates.

Now I notice that you are thinking that occurrences returns a collection of hashes, it doesn't it returns a collection of components, e.g. Events so you should be using

  o.dtstart

instead of
  
  o[:begin_date]</body>
      <body-html>&lt;div&gt;&lt;p&gt;Bruno,&lt;/p&gt;
&lt;p&gt;I tried to verify your problem, but I'm not sure I
understand.&lt;/p&gt;
&lt;p&gt;It seems to work except that the second event occurences are
getting DateTimes for their dtstart values instead of Dates.&lt;/p&gt;
&lt;p&gt;Now I notice that you are thinking that occurrences returns a
collection of hashes, it doesn't it returns a collection of
components, e.g. Events so you should be using&lt;/p&gt;
&lt;p&gt;o.dtstart&lt;/p&gt;
&lt;p&gt;instead of&lt;br&gt;&lt;/p&gt;
&lt;p&gt;o[:begin_date]&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-21T17:20:04-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">40236</milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Component without recurrence properties should enumerate just itself.</title>
      <updated-at type="datetime">2009-05-21T17:20:06-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title>0.0.8</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>Hi Rick 
Thanks for your response. The heart of my problem was that I didn't knew the Event::dtstart() function. Now I'm able to do :

@@@
&gt; cal.first.events[1].occurrences(:starting =&gt; Date.parse('2009-07-21'), :before =&gt; Date.parse('2009-10-21')).collect{|a| a.dtstart.to_s}
=&gt; [&quot;2009-08-03T00:00:00+00:00&quot;, &quot;2009-09-03T00:00:00+00:00&quot;, &quot;2009-10-03T00:00:00+00:00&quot;]
@@@

It's perfect for me.
I can write then a piece of doc to help other people like me who are looking for a way to enumerate all occurences of an event.

Thanks</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi Rick&lt;br&gt;
Thanks for your response. The heart of my problem was that I didn't
knew the Event::dtstart() function. Now I'm able to do :&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;&amp;gt; cal.first.events[1].occurrences(:starting =&amp;gt; Date.parse('2009-07-21'), :before =&amp;gt; Date.parse('2009-10-21')).collect{|a| a.dtstart.to_s}
=&amp;gt; [&quot;2009-08-03T00:00:00+00:00&quot;, &quot;2009-09-03T00:00:00+00:00&quot;, &quot;2009-10-03T00:00:00+00:00&quot;]&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;It's perfect for me.&lt;br&gt;
I can write then a piece of doc to help other people like me who
are looking for a way to enumerate all occurences of an event.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-25T09:25:09-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">40236</milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Component without recurrence properties should enumerate just itself.</title>
      <updated-at type="datetime">2009-05-25T09:25:09-04:00</updated-at>
      <user-id type="integer">47324</user-id>
      <user-name>brunetton (at gmail)</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title>0.0.8</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>Perhaps you might consider adding something to the wiki on github under FAQs</body>
      <body-html>&lt;div&gt;&lt;p&gt;Perhaps you might consider adding something to the wiki on
github under FAQs&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-25T09:26:57-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">40236</milestone-id>
      <number type="integer">3</number>
      <permalink>fwd-ri_cal-question</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Component without recurrence properties should enumerate just itself.</title>
      <updated-at type="datetime">2009-05-25T09:26:57-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3</url>
      <milestone-title>0.0.8</milestone-title>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>0fafabd9b7b3e3043305b47f584c2918a701926d</code>
      <content-type>text/calendar</content-type>
      <created-at type="datetime">2009-05-19T12:53:45-04:00</created-at>
      <filename>FrenchHolidays.ics</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">124144</id>
      <size type="integer">12411</size>
      <uploader-id type="integer">11063</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rick_denatale.lighthouseapp.com/attachments/124144/FrenchHolidays.ics</url>
    </attachment>
    <attachment type="Attachment">
      <code>93fb8f1cd2353fdecff4212a52dfa4eabe55bafb</code>
      <content-type>text/calendar</content-type>
      <created-at type="datetime">2009-05-20T06:06:08-04:00</created-at>
      <filename>test.ics</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">124494</id>
      <size type="integer">621</size>
      <uploader-id type="integer">47324</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rick_denatale.lighthouseapp.com/attachments/124494/test.ics</url>
    </attachment>
  </attachments>
</ticket>
